package com.dw.common.mapper;

import io.etcd.jetcd.KeyValue;

import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;

public class KeyValueMapper {
    public static List<String> BytesToString(List<KeyValue> keyValues) {
        List<String> result = new ArrayList<>(keyValues.size());
        for (KeyValue keyValue : keyValues) {
            result.add(keyValue.getValue().toString(StandardCharsets.UTF_8));
        }
        return result;
    }
}
